const {ccclass, property} = cc._decorator;
@ccclass
export default class TestItem extends cc.Component {
    @property(cc.Label)
    index_l:cc.Label=null;

    @property
    _index:number=0;
    init(){
        this.index_l=this.node.getChildByName('index').getComponent(cc.Label);
    }
    setIndex(index){
        this._index=index;
    }
    showInfo(info){
        if(!this.index_l)this.init();
        this.index_l.string=info;
    }
}
